<template>
  <view class="help">
    <view class="main" >
      <view class="list" v-for="(item, index) in initData" :key="index" @click="go_type(item.dictValue)">
         {{ item.dictValueDesp}}
        <uni-icons type="arrowright" size="24" color="#999" />
      </view>
    </view>
  </view>
</template>
<script>
import { uniIcons } from '@dcloudio/uni-ui';
import help from '../../../servers/my/help.js';
export default {
	components: { uniIcons },
	data() {
		return {
			compile: false,
			initData:'',
			is_go_top: false,
			is_all: false
		};
	},
	mounted() {
		var _this=this;
		uni.showLoading({
			title: '数据正在加载中',
			mask: true,
			complete: function() {
				_this.getData();
			}
		});
	},
	methods: {
		getData(){
			var obj={dictGroupCode:'helpdoctype'}
			help.helptype(obj)
				.then(res => {
					if(res.code==200){
						this.initData=res.data;
						console.log(this.initData);
						uni.hideLoading();
					}else{
						uni.hideLoading();
						uni.showToast({
						    title: '数据加载失败，请联系管理员'
						});
					}
				})
				.catch(err => {
					console.log(new Error('请检查网络后重试'));
				});
		},
		go_type(type){
			this.commonality.route_baling('/pages/shop/my/faq','myhelptype',type)
		}
		
	}
};
</script>
<style lang="less" scoped>
.help {
  height: 100%;
  .main {
    // position: absolute;
    // top: 80rpx;
    // bottom: 0;
    // width: 100%;
    // overflow: auto;
    background: #fff;
    padding: 0 20rpx;
    .list {
      line-height: 110rpx;
      font-size: 30rpx;
      border-bottom: 1rpx solid #e1e1e1; /*no*/
      .uni-icons {
        float: right;
      }
    }
    .list:nth-last-child(1) {
      border-bottom: none;
    }
  }
}
</style>
